#! /bin/bash -x

#PS3='Choose your option(enter the number):'

#echo

#select option in "intensive" "moderate" "infrequent"
#do
#	echo
#	echo "You selected $option."
#	echo 
#	break
#done

#echo $0 $1 $2 $@

#shift $((OPTIND-1))

#exit 1

###########
#while read line;
#do
#	for length in $line;
#	do
#		echo $length
#	done
#
#done < $1

#########################
declare -a lengths
i=0
exec < $1
function rf {
read line 
for length in $line;
do
	let lengths[$i]=$length
	echo ${lengths[$i]}
	let i+=1
	echo $i
done
read line
for length in $line;
do
	let lengths[$i]=$length
	echo ${lengths[$i]}
	let i+=1
done
}
rf
rf
